<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Promise 自定义</title>
    <script src="./Promise.js"></script>
</head>
<body>
    <script>
        let p = new Promise((resolve, reject) => {
            setTimeout(() => {
                resolve('ok');
            }, 1000)
        });

        //then 方法的回调是『异步回调』
        p.then(v => {
            console.log(111);
        }).then(v => {
            console.log(222);
            return new Promise(() => {})
        }).then(v => {
            console.log(333);
        }).then(v => {
            console.log(444);
        })
        
       
    </script>
</body>
</html>